﻿<UserControl x:Class="Noc.Pomodoro.Controls.DigitalClockControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="100" d:DesignWidth="200"
             x:Name="ControlRoot" Background="Transparent">

  <UserControl.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="../Styles/ApplicationStyles.xaml" />
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </UserControl.Resources>

  <Grid>

    <TextBlock TextAlignment="Center" VerticalAlignment="Center" Style="{StaticResource DigitalClockText}">
      <TextBlock.Text>
        <MultiBinding StringFormat="{}{0}:{1:00}">
          <Binding Path="Time.Minutes" ElementName="ControlRoot"/>
          <Binding Path="Time.Seconds" ElementName="ControlRoot"/>
        </MultiBinding>
      </TextBlock.Text>
    </TextBlock>

  </Grid>
</UserControl>